<?php
	/*
		Clase auxiliar para mantener funciones/variables en comun entre todos los controladores
	*/
	class MY_Controller extends CI_Controller{			
		
		var $imgPath = 'assets/imgs/';	

		function __construct(){
			parent::__construct();		
			setlocale(LC_ALL, "es_AR");		
		}		
		/*
			Redefinida en Admin_Controller, si existe.
		*/
		function _vistaGeneral($pagina,$data = NULL){				
			if($data == NULL){
				$data = array();
			}

			$data['imgPath']	=	$this->imgPath;

			$this->load->view("templates/header",$data);
			$this->load->view("$pagina",$data);
			$this->load->view("templates/footer");
		}

		function _enviarMail($infoMail){	
			$this->load->library("email");
			$this->email->from($infoMail['email'],$infoMail['nombre']);
			$this->email->to($infoMail['to']);
			
			$this->email->subject($infoMail['subject']);
			$this->email->message($infoMail['contenido']);

			return $this->email->send();		
		}
	}
?>